<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta name="keywords" content="" />
    <meta name="description" content="" />
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> 
    <meta name="force-rendering" content="webkit">   
     <meta http-equiv="Cache-Control" content="no-siteapp">
    <title></title>
</head>
<body>
    <script src="/static/js/jquery-1.11.2.min-1.js"></script>
    <script src="/asset/js/common/host.js"></script>
    <script>
       (function(){
            var userId = window.location.search.split('=')[1];
            var hostApi = "https://japi.yczihua.com";
           var param ={
                "YcUser": {
                    "id": userId
                },
                "tag": "YcUser"
           };
           $.ajax({
				type: 'POST', //提交方法是POST
				url: host + '/get', //请求的路径s
				data: JSON.stringify(param),
				contentType: "application/json",
				error: function error(_error2) {
					//请求失败的回调方法 
                    alert('登录失败!请从新登陆');
                    window.location.href="/login/login.html"
				},
				success: function success(data) {
					if (data.code == 200) {
                    var id = data.YcUser.id;
                    var uid = data.YcUser.uid;
                    var user_name = data.YcUser.login_name;
                    var point = data.YcUser.point;
                    var levelId = data.YcUser.level_id;
                    var balance = data.YcUser.balance;
                    var growth = data.YcUser.growth;
                    var data = {
                        "id": id,
                        "uid": uid,
                        "user_name": user_name,
                        "point": point,
                        // "token": data.attributes.token,
                        "level_id": levelId,
                        "balance": balance,
                        "growth": growth
                    };
			        localStorage.setItem("user_info", JSON.stringify(data));
                        window.location.href="/"
					} else {
						window.location.href="/login/login.html"
					}
				}
			});
       })()
    </script>
</body>
</html>